import request from '@/utils/request.js'

const departmentApi = {
    selectAll() {
        return request.get('/department/selectAll')
    },
    list(departmentQuery) {
        return request.get('/department/list', {params: departmentQuery})
    },
    deleteById(id) {
        return request.delete(`/department/deleteById/${id}`)
    },
    deleteAll(ids) {
        return request.delete(`/department/deleteAll/${ids}`)
    },
    add(department) {
        return request.post(`/department/add`, department)
    },
    selectById(id) {
        return request.get(`/department/selectById/${id}`)
    },
    update(department) {
        return request.put(`/department/update`, department)
    }
}

export default departmentApi